<template>
  <div class="w-full mb-30px">
    <div class="grid grid-column-5 gap-15px" >
      <product v-for="(product, index) in list" :key="index" :item="product" :sizeData="{
          width: '228px',
          height: '228px',
        }"></product>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { dailyNewListApi } from '~/server/goodsApi'
const list = ref<any[]>([])

onMounted(() => {
  getData()
})

const getData = async () => {
  const res = await dailyNewListApi({
      page: 1,
      limit: 10
    })
    list.value = res.list
    if(res.list.length === 0){
      emit('handleSubmitLeave',false)
    }
}

const emit = defineEmits(['handleSubmitLeave'])


</script>
<style scoped lang="scss">

</style>
